<div class="container h-100 flex-column">
  <div class="row">
    <div class="col-12">
      <div class="btn-group" role="group" aria-label="Basic example">
        <button type="button" class="btn btn-primary" (click)="doSave()">保存到服务器</button>
        <button type="button" class="btn btn-primary" (click)="openFile()">打开本地文件</button>
        <button type="button" class="btn btn-primary" (click)="saveLocally()">保存本地文件</button>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="col-12">
      <input type="text" [(ngModel)]="title" class="form-control" placeholder="在此输入标题">
    </div>
  </div>
  <div class="row h-100">
    <div class="col-6">
      <!-- 这是左边 -->

      <textarea #ta class="h-100 w-100" [(ngModel)]="srcTxt" (ngModelChange)="srcChanged($event)"></textarea>
    </div>
    <div class="col-6">
      <span>
        <!-- 这是右边 -->

        <!-- 通过监听动态转换 -->
        <!-- <div [innerHTML]="outTxt"></div> -->
        <div [MathJax]="outTxt"></div>

        <!-- 通过pipe转换 -->
        <!-- <div [innerHTML]="srcTxt | md"></div> -->
      </span>
    </div>
  </div>
</div>